<!DOCTYPE html>
<html lang="zh-cn">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>JS011-表单属性</title>
</head>

<body>
  <input id="uname" type="text" value="张三" />
  <script>
    const unameInput = document.querySelector('input#uname')
    const uname = unameInput.value
    document.writeln(uname)
  </script>
</body>

</html>